{{/*
Create metadata labels
*/}}
{{- define "demoapp.metadata.labels" -}}
app: {{ .Chart.Name }}
chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
io.cattle.field/appId: {{ .Release.Name }}
{{- end }}

{{/*
Create selector match labels
*/}}
{{- define "demoapp.selector.matchLabels" -}}
app: {{ .Chart.Name }}
release: {{ .Release.Name }}
{{- end }}

{{/*
Create pod redeploy labels
*/}}
{{- define "demoapp.pods.recreateLabels" -}}
recreatetimestamp: {{ now | unixEpoch | quote}}
{{- end }}